<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Number</title>
</head>
<body>

</body>
<script>
    //1. parseFloat()  将传入的字符串浮点数转为浮点数
    document.write(Number.parseFloat("3.14") + "<br>");

    //2. parseInt()    将传入的字符串整数转为整数
    document.write(Number.parseInt("320") + "<br>");
    // 从数字开始转换，直到不是数字为止
    document.write(Number.parseInt("3202sj") + "<br>");
</script>
</html>